3.53 \(\int \frac {\sec ^4(c+d x)}{(a+a \sec (c+d x))^2} \, dx\)

Optimal. Leaf size=89 \[ \frac {4 \tan (c+d x)}{3 a^2 d}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {2 \tan (c+d x)}{a^2 d (\sec (c+d x)+1)}-\frac {\tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]

[Out]

-2*arctanh(sin(d*x+c))/a^2/d+4/3*tan(d*x+c)/a^2/d+2*tan(d*x+c)/a^2/d/(1+sec(d*x+c))-1/3*sec(d*x+c)^2*tan(d*x+c
)/d/(a+a*sec(d*x+c))^2

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3816, 4008, 3787, 3770, 3767, 8} \[ \frac {4 \tan (c+d x)}{3 a^2 d}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {2 \tan (c+d x)}{a^2 d (\sec (c+d x)+1)}-\frac {\tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + a*Sec[c + d*x])^2,x]

[Out]

(-2*ArcTanh[Sin[c + d*x]])/(a^2*d) + (4*Tan[c + d*x])/(3*a^2*d) + (2*Tan[c + d*x])/(a^2*d*(1 + Sec[c + d*x]))
- (Sec[c + d*x]^2*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3816

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(d^2*
Cot[e + f*x]*(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 2))/(f*(2*m + 1)), x] + Dist[d^2/(a*b*(2*m + 1)), In
t[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 2)*(b*(n - 2) + a*(m - n + 2)*Csc[e + f*x]), x], x] /; Fr
eeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[n, 2] && (IntegersQ[2*m, 2*n] || IntegerQ[m]
)

Rule 4008

Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_
)), x_Symbol] :> -Simp[((A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m)/(b*f*(2*m + 1)), x] + Dist[1/(b^2*(2*
m + 1)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[A*b*m - a*B*m + b*B*(2*m + 1)*Csc[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]

Rubi steps

\begin {align*} \int \frac {\sec ^4(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=-\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \frac {\sec ^2(c+d x) (2 a-4 a \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{3 a^2}\\ &=\frac {2 \tan (c+d x)}{a^2 d (1+\sec (c+d x))}-\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {\int \sec (c+d x) \left (-6 a^2+4 a^2 \sec (c+d x)\right ) \, dx}{3 a^4}\\ &=\frac {2 \tan (c+d x)}{a^2 d (1+\sec (c+d x))}-\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {4 \int \sec ^2(c+d x) \, dx}{3 a^2}-\frac {2 \int \sec (c+d x) \, dx}{a^2}\\ &=-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {2 \tan (c+d x)}{a^2 d (1+\sec (c+d x))}-\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {4 \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 a^2 d}\\ &=-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {4 \tan (c+d x)}{3 a^2 d}+\frac {2 \tan (c+d x)}{a^2 d (1+\sec (c+d x))}-\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 1.26, size = 247, normalized size = 2.78 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (\tan \left (\frac {c}{2}\right ) \cos \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+6 \cos ^3\left (\frac {1}{2} (c+d x)\right ) \left (\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\sin \left (\frac {c}{2}\right )+\cos \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}+2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )+14 \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right ) \cos ^2\left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d (\sec (c+d x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + a*Sec[c + d*x])^2,x]

[Out]

(2*Cos[(c + d*x)/2]*Sec[c + d*x]^2*(Sec[c/2]*Sin[(d*x)/2] + 14*Cos[(c + d*x)/2]^2*Sec[c/2]*Sin[(d*x)/2] + 6*Co
s[(c + d*x)/2]^3*(2*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 2*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + Si
n[d*x]/((Cos[c/2] - Sin[c/2])*(Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] +
Sin[(c + d*x)/2]))) + Cos[(c + d*x)/2]*Tan[c/2]))/(3*a^2*d*(1 + Sec[c + d*x])^2)

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 146, normalized size = 1.64 \[ -\frac {3 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - {\left (10 \, \cos \left (d x + c\right )^{2} + 14 \, \cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sec(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/3*(3*(cos(d*x + c)^3 + 2*cos(d*x + c)^2 + cos(d*x + c))*log(sin(d*x + c) + 1) - 3*(cos(d*x + c)^3 + 2*cos(d
*x + c)^2 + cos(d*x + c))*log(-sin(d*x + c) + 1) - (10*cos(d*x + c)^2 + 14*cos(d*x + c) + 3)*sin(d*x + c))/(a^
2*d*cos(d*x + c)^3 + 2*a^2*d*cos(d*x + c)^2 + a^2*d*cos(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.43, size = 106, normalized size = 1.19 \[ -\frac {\frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{2}} - \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sec(d*x+c))^2,x, algorithm="giac")

[Out]

-1/6*(12*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 12*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 + 12*tan(1/2*d*x +
 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*a^2) - (a^4*tan(1/2*d*x + 1/2*c)^3 + 15*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d

________________________________________________________________________________________

maple [A]  time = 0.40, size = 120, normalized size = 1.35 \[ \frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{6 a^{2} d}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{2} d}-\frac {1}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2} d}-\frac {1}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+a*sec(d*x+c))^2,x)

[Out]

1/6/a^2/d*tan(1/2*d*x+1/2*c)^3+5/2/a^2/d*tan(1/2*d*x+1/2*c)-1/a^2/d/(tan(1/2*d*x+1/2*c)-1)+2/a^2/d*ln(tan(1/2*
d*x+1/2*c)-1)-1/a^2/d/(tan(1/2*d*x+1/2*c)+1)-2/a^2/d*ln(tan(1/2*d*x+1/2*c)+1)

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 145, normalized size = 1.63 \[ \frac {\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+a*sec(d*x+c))^2,x, algorithm="maxima")

[Out]

1/6*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 12*log(sin(d*x + c)/(cos
(d*x + c) + 1) + 1)/a^2 + 12*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d*
x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

mupad [B]  time = 0.69, size = 92, normalized size = 1.03 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6\,a^2\,d}-\frac {4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )}+\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^4*(a + a/cos(c + d*x))^2),x)

[Out]

tan(c/2 + (d*x)/2)^3/(6*a^2*d) - (4*atanh(tan(c/2 + (d*x)/2)))/(a^2*d) - (2*tan(c/2 + (d*x)/2))/(d*(a^2*tan(c/
2 + (d*x)/2)^2 - a^2)) + (5*tan(c/2 + (d*x)/2))/(2*a^2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+a*sec(d*x+c))**2,x)

[Out]

Integral(sec(c + d*x)**4/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x)/a**2

________________________________________________________________________________________